package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.OrdersPageQueryDTO;

import com.sky.entity.Orders;

import com.sky.vo.OrderOverViewVO;
import com.sky.vo.OrderSubmitVO;

import java.time.LocalDateTime;
import java.util.List;

import com.sky.vo.OrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


import java.awt.*;

@Mapper
public interface OrderMapper {
    void insertOrder(Orders orders);

    void updateOrder(Orders orders);

    OrderSubmitVO selectOrderById(Orders orders);

    Orders getOrderById(Long id);

    List<Orders> list();

    Page<Orders> pageQuery(OrdersPageQueryDTO ordersPageQueryDTO);

    @Select("select * from orders where status = #{status} AND order_time < #{time}")
    List<Orders> getByStausAndOrderTimeoutLT(Integer status, LocalDateTime time);

    OrderOverViewVO getOrderStatus();


}
